<?php
/**
 * Created by PhpStorm.
 * User: YC
 * Date: 2017/4/30
 * Time: 13:51
 */

namespace app\home\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        'company|公司名称' => 'require|max:40',
        'username|姓名'   =>  'require|max:10',
        'mobile|手机号码'   =>  'require|mobile|unique:user',
        'code|验证码'   =>  'require',
        'repassword|重复密码'   =>  'require|confirm:password',
        'password|密码'   =>  'require|length:6,16',
        'read|同意协议'=>'require',
    ];
    protected $message = [
        'password.require' => '密码长度在6-16位之间',
        'read.require'     => '必须同意协议才能注册',
        'repassword.confirm' => '密码和重复密码不一致',
    ];
}